package com.term.domain.enums;

import java.util.Map;

/**
 * Created by chenGang on 2017/1/14.
 */
public enum RegionTypeEnums implements BaseEnum<RegionTypeEnums,String> {
    PROVINCE("PROVINCE","省份"),
    MUNICIPALITY("MUNICIPALITY","直辖市"),
    CITY("PROVINCE","城市"),
    DISTRICT("DISTRICT","区县")
    ;


    private final String value;
    private final String displayName;
    private static java.util.Map<String, RegionTypeEnums> valueMap = new java.util.HashMap<>();

    static {
        for ( RegionTypeEnums e : RegionTypeEnums.values() ) {
            valueMap.put( e.value, e );
        }
    }

    RegionTypeEnums(String value, String displayName ) {
        this.value = value;
        this.displayName = displayName;
    }

    @Override
    public RegionTypeEnums getEnum(String value ) {
        return valueMap.get( value );
    }

    @Override
    public java.util.Map<String, RegionTypeEnums> getAllValueMap() {
        return valueMap;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getDisplayName() {
        return displayName;
    }
}
